{% extends "base.html" %}
{% block content %}
<div class="container mt-4">
    <h2>提交阶段进度</h2>
    <div class="card mb-4">
        <div class="card-header bg-primary text-white">
            我的课题
        </div>
        <div class="card-body">
            <h5 class="card-title">{{ project.title }}</h5>
            <p class="card-text"><strong>开始日期：</strong>{{ project.start_date|date:"Y-m-d" }}</p>
            <p class="card-text"><strong>截止日期：</strong>{{ project.end_date|date:"Y-m-d" }}</p>
        </div>
    </div>

    <form method="post" enctype="multipart/form-data" class="needs-validation" novalidate>
        {% csrf_token %}
        <div class="mb-3">
            <label for="id_title" class="form-label">进度标题</label>
            <input type="text" class="form-control" id="id_title" name="title" required>
        </div>
        <div class="mb-3">
            <label for="id_content" class="form-label">进度内容</label>
            <textarea class="form-control" id="id_content" name="content" rows="6" required></textarea>
        </div>
        <div class="mb-3">
            <label for="id_file" class="form-label">上传附件（可选）</label>
            <input type="file" class="form-control" id="id_file" name="file">
        </div>
        <button type="submit" class="btn btn-success">提交进度</button>
        <a href="{% url 'student_dashboard' %}" class="btn btn-secondary">取消</a>
    </form>
</div>
{% endblock %}
